import 'package:flutter_eve_plugin/model/health/sys_health_property.dart';
import 'package:flutter_eve_plugin/model/health/user_body_property.dart';

class HealthState {
  PropertyHealthModel propertyHealthModel;
  UserBodyModel userBodyModel;
  int sysCurrPageIndex;

  HealthState(
      {this.propertyHealthModel, this.userBodyModel, this.sysCurrPageIndex});

  HealthState copyWith({propertyHealthModel, userBodyModel, sysCurrPageIndex}) {
    return HealthState(
        propertyHealthModel: propertyHealthModel ?? this.propertyHealthModel,
        userBodyModel: userBodyModel ?? this.userBodyModel,
        sysCurrPageIndex: sysCurrPageIndex ?? this.sysCurrPageIndex);
  }

  static HealthState initialState() {
    return HealthState(
        propertyHealthModel: PropertyHealthModel(0, []),
        userBodyModel: UserBodyModel([]),
        sysCurrPageIndex: 0);
  }
}
